const path = require('path')

module.exports = {
  entry: path.join(__dirname, 'src/index.js'),
  output: {
    filename: 'bundle.js',
    path: path.join(__dirname, 'dist')
  },
  module: {
    rules: [{
      test: /\.vue$/,
      loader: 'vue-loader'
    }, {
      test: /\.css$/,
      use: [
        'style-loader',
        'css-loader',
      ]
    }, {
      test: /\.(gif|jpg|jpeg|png|svg)$/,
      use: [{
        //转换base64
        loader: 'url-loader',
        opionts: {
          limit: 1024,
          // 输出文件名
          name: '[name].[ext]'
        }
      }]
    }]
  }

}